#define _CRT_SECURE_NO_WARNINGS 1



//https://www.luogu.com.cn/problem/P9231?contestId=233548


#include<iostream>
using namespace std;
typedef long long ll;
ll l, r, cur;
int main()
{
    cin >> l >> r;
    for (ll i = l;i <= r;i++)
    {
        if (i % 4 == 0 || i % 2 != 0)
            cur++;
    }
    cout << cur;
    return 0;
}